1. Field of the Invention
The present invention relates to an image sensing apparatus using a solid-state image sensor such as a charge coupled device (CCD) and, more particularly, to an automatic focusing device based on a phase-difference detection method suitable for use with a still-image recording apparatus, such as a still video camera, for recording a still image.
2. Description of the Related Art
Conventionally, many single-lens reflex types of silver-halide cameras employing silver-halide film have used automatic focusing (AF) devices based on a phase-difference detection method.
Such an AF system based on the phase-difference detection method will be described below with reference to FIGS. 1 to 4 and 7.
FIG. 1 schematically shows an AF optical system. In the shown AF optical system, light incident from a lens 1 passes through a half-mirror 2 and is reflected downward from a submirror 3. The reflected light passes through a primary focal plane "p" and, in turn, passes through an infrared cut filter 4 and a field lens 5 to a secondary imaging lens 6 which is called "spectacle lens". The reflected light is separated into two images A and B by the secondary imaging lens 6. The two images A and B are respectively made incident on sensor elements 7A and 7B of the AF sensor 7 shown in FIG. 2.
Referring to FIG. 2, each of the sensor elements 7A and 7B of the AF sensor 7 is made from a line sensor in which a predetermined number of pixels which are formed by photo-electric conversion elements are arrayed at intervals of a predetermined pitch. Outputs relative to the two images A and B are provided by the two sensor elements 7A and 7B. As shown, if an in-focus state is provided in the primary focal plane "p", the interval between the outputs relative to the respective images A and B is constant at a reference interval Z.sub.OH. If a near-focus state is provided in the primary focal plane "p", such an interval is narrower than the reference interval Z.sub.OH, while if a far-focus state is provided in the primary focal plane "p", the interval is wider than the reference interval Z.sub.OH.
Then, the lens 1 is made to move until the interval Z.sub.OH corresponding to the in-focus state is reached, thereby executing focusing. The amount of the movement of the lens 1, i.e., the amount of movement of an image surface, is obtained by calculations using the interval between the two images A and B. The calculations are performed on the basis of the following algorithm.
First, the output of the AF sensor 7 is received as data, and the correlation between the outputs of the two sensor elements 7A and 7B is obtained. The method of obtaining such a correlation is called "MIN algorithm", and if A[1] to A[n] represent the output data of the sensor element 7A and B[1] to B[n] represent the output data of the sensor element 7B, the amount of correlation, "V.sub.0 ", corresponds to the hatched portion of FIG. 3(a). This amount of correlation, "V.sub.0 ", is expressed as: ##EQU1## (where "min (A, B)" is the smaller value of A and B).
Thus, the amount of correlation, "V.sub.0 ", is calculated. Secondly, as shown in FIG. 3(b), the amount of correlation, "V.sub.1 ", between data obtained by shifting the image A by one bit of the AF sensor 7 and data indicative of the image B is calculated. This amount of correlation, "V.sub.1 ", is expressed as: ##EQU2## In a similar manner, the amounts of correlation, "V.sub.2 ", "V.sub.3 ", . . . , are calculated sequentially.
FIG. 7 schematically shows the manner in which calculating ranges allocated to the respective sensor elements A and B are shifted relative to each other during the process of obtaining the individual amounts of correlation, where it is assumed that the employed AF sensor 7 is made up of 40 pixels, the calculating range allocated to each of the sensor elements A and B is 30 pixels and the maximum amount of shifting (the maximum number of shiftings) is .+-.10 bits.
During the process of calculating the individual amounts of correlation, "V.sub.0 ", "V.sub.1 ", "V.sub.2 ", "V.sub.3 ", . . . , in the above-described manner, if the two images A and B substantially coincide with each other as shown in FIG. 3(c), the amount of correlation at this time reaches its maximum value V.sub.max. Thus, from the amount of shifting, "K", at this time and the preceding and succeeding amounts of shifting, "K-1" and "K+1", a true maximum value V.sub.maxs and an associated true amount of shifting, "Ks", are obtained by the interpolation method shown in FIG. 4.
Referring to FIG. 4, as the amount of shifting varies in the order of K-1.fwdarw.K, the amount of correlation increases along a line Q.sub.1. As the amount of shifting varies in the order of K.fwdarw.K+1, the amount of correlation decreases along a slope Q.sub.2. Accordingly, the point at which the lines Q.sub.1 and Q.sub.2 intersect corresponds to the true maximum value V.sub.maxs, and the amount of shifting at this time is the true amount of shifting, "Ks", which is obtained as the amount of deviation.
Since the relation between the amount of deviation and the amount of the phase difference between the images A and B, i.e., what is called the amount of defocus, is determined for each individual optical system, the amount of defocus is obtained from the amount of deviation, "Ks". The amount by which the lens 1 is to be moved is obtained from the amount of deviation, "Ks", and the lens 1 is made to move until an in-focus state is reached.
In the above-described case, to maximize the amount of data required to calculate the amounts of correlation, the following sequence has conventionally been executed. First, the number of pixels to be handled in the calculation of the amounts of correlation is increased with the amount of shifting being decreased, and a calculation is performed under these conditions. If the above-described amount of deviation is not obtained in such a first calculation of the amounts of correlation, it is determined that the optical system is in a large-defocus state, and a second calculation of the amounts of correlation is performed. In the second calculation, the number of pixels to be handled in the calculation of the amounts of correlation is decreased with the amount of shifting being increased, and the amount of deviation is detected.
However, in a still video camera for recording a still image by using a solid-state image sensor such as a CCD, if an AF sensor identical to that used in a silver-halide camera is employed, AF accuracy may deteriorate or a contention between far focus and near focus may easily take place. This is because, if such an AF sensor is used in the still video camera, the number of effective pixels of the AF sensor becomes relatively small as compared to the case of the silver-halide camera, and the probability that the optical system is placed in a large-defocus state is high before an in-focus state is reached, i.e., before the lens is moved. For this reason, in the first calculation performed with a smaller amount of shifting and a larger number of pixels, it is substantially impossible to detect the amount of deviation, with the result that the first calculation of the amounts of correlation becomes meaningless.